package com.mvp.shq.washer.entity;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2017/9/7.
 */

public class Bill {

    /**
     * id : 7ca3d66aa76548338b17c395b840f609
     * createDate : 2017-09-07 09:53:40
     * updateDate : 2017-09-07 09:53:40
     * userId : 1e8b5f1a89b1492095eabefd6e455222
     * money : 0.01
     * signFlag : 0   0加，1减
     * content : 微信充值
     * orderNo : R355289482414522368
     */

    private String id;
    private String createDate;
    private String updateDate;
    private String userId;
    private BigDecimal money;
    private String signFlag;
    private String content;
    private String orderNo;

    public static Bill objectFromData(String str) {

        return new Gson().fromJson(str, Bill.class);
    }

    public static List<Bill> arrayBillFromData(String str) {

        Type listType = new TypeToken<ArrayList<Bill>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCreateDate() {
        return createDate;
    }

    public void setCreateDate(String createDate) {
        this.createDate = createDate;
    }

    public String getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(String updateDate) {
        this.updateDate = updateDate;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    public String getSignFlag() {
        return signFlag;
    }

    public void setSignFlag(String signFlag) {
        this.signFlag = signFlag;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }
}
